home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.4 KB | 38 lines | [TEXT/GEOL] |
- Item 9003552 10-Nov-88 10:46
-
- From: ROSENSTEIN1 Rosenstein, Larry
-
- To: D1157 All Star Computer, Dev, L Goldman
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: re Jumping Over Ancestors
-
- I agree with Kurt that skipping over ancestors is not a good language feature.
- (There is no way to do so in Object Pascal, as he says.) Skipping over a level
- in the class hierarchy violates the integrity of the class being skipped over.
- I would argue that if there is a case where you need to skip over a class, then
- something is wrong with the class design.
-
- This is not the case for TSortedList, however, since you are talking about a
- bug in the implementation. If there is a bug in TSortedList, then it should be
- fixed.
-
- A technique used in Smalltalk is to define a basic method that performs some
- function and that is never overridden. (For example, I think that Object
- defines basicAt: to access the indexed part of an object.) Then there is a
- second method that calls the first, which may be overridden.Subclasses, can
- call the basic method to skip over the inherited implementations. (In this
- case at: call basicAt:.)
-
- This is a good design technique in general, because it breaks down methods into
- their fundamental parts, and provides more flexibility for clients of that
- class.
-
- Larry Rosenstein
-
-
-
-
-
-